<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>课程统计总览</title>
	<link rel="stylesheet" type="text/css" href="/static/css/hw-admin.css">
	<link rel="stylesheet" href="/static/css/lb.css"> 
    <!--[if lt IE 9]>
    　 <script src="/static/lib/html5shiv.min.js" type="text/javascript"></script>
       <script src="/static/lib/selectivizr.min.js" type="text/javascript"></script>
    <![endif]-->  
</head>

<body>
        <div class="hw-iframe">
            <div class="hw-header-wrapper">
                <div class="hw-header">
                    <div class="hw-header__item--left">
                        机器用户增量统计表
                    </div>
                    <div class="hw-header__item--right">
                        <div class="hw-btn-group">
                        <a href="<?=isset($_GET['date_start'])&&isset($_GET['date_end'])?base_url().'Admin/MachineCount/machineExcelOut?date_start='.$_GET['date_start'].'&date_end='.$_GET['date_end']:''?>">
                            <button class="hw-btn--normal">
                                导出
                            </button>
                        </a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="hw-filter-wrapper">
                <div class="hw-filter">
                    <form method="GET" action="<?=$url ?>">
                        
                        <div class="filter-detail" style="display: block;">
                            
                            <div class="filter-item">
                                <div class="hw-input-label">
                                    <label class="name" for="">选择日期</label>
                                    <div class="input-icon-group">
                                        <input type="text" id="startime" autocomplete="off" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'endtime\',{d: -1})||\'%y-%M-{%d-1}\'}'})" placeholder="选择日期" name="date_start" value="<?=isset($_GET['date_start']) ? $_GET['date_start'] : date('Y-m-d',strtotime('-1 month')) ?>">
                                        <div class="icon-wrapper">
                                            <i class="iconfont">&#xe601;</i>
                                        </div>
                                    </div>
                                </div>

                                <div class="hw-input-label">
                                    <label class="name" for="" style="width: 34px;text-align: center;">——</label>
                                    <div class="input-icon-group">
                                        <input type="text" id="endtime" autocomplete="off"  onclick="WdatePicker({minDate:'#F{$dp.$D(\'startime\',{d:1});}',maxDate: '%y-%M-#{%d-1}'})" placeholder="选择日期" name="date_end" value="<?=isset($_GET['date_end']) ? $_GET['date_end'] : date('Y-m-d', time()) ?>">
                                        <div class="icon-wrapper">
                                            <i class="iconfont">&#xe601;</i>
                                        </div>
                                    </div>
                                </div>
                                <div class="operate-btns">
                                    <button class="hw-btn"><i class="iconfont">&#xe6f4;</i>查询</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="main-table-wrap">
                <form id="table-form" method="POST" action="">
                
                            <table cellspacing="0" cellpadding="0" border="0">  
                                <colgroup>
                                    <!-- <col class="col-3">
                                    <col class="col-2">
                                    <col class="col-15">
                                    <col class="col-7">
                                    <col class="col-4">
                                    <col class="col-5"> 
                                    <col class="col-10"> -->
                                </colgroup>

                                <thead>
                                    <tr>
                                        <th>酒店名称</th>
                                        <th>新增认证用户量</th>
                                        <th>累积认证用户量</th>
                                        <th>新增注册用户量</th>
                                        <th>新增授权用户量</th>
                                    </tr>
                                </thead>
                                

                                <tbody>
                                <?php if(isset($list) && count($list)!=0){ foreach ($list as $key => $value) {?>
                                    <tr>
                                        <td><?=$value['name']?></td>
                                        <td><a href="<?=base_url().'Admin/MemberCount/mcountList?hotel='.$value['id'].'&date_start='.date('Y-m-d', strtotime('-1 month')).'&date_end='.date('Y-m-d',strtotime('-1 day'))?>"><?=$value['cred']?></a></td>
                                        <td><a href="<?=base_url().'Admin/MemberCount/mcountList?hotel='.$value['id'].'&date_start='.date('Y-m-d', strtotime('-1 month')).'&date_end='.date('Y-m-d',strtotime('-1 day'))?>"><?=$value['totalCred']?></a></td>
                                        <td><a href="<?=base_url().'Admin/MemberCount/mcountList?hotel='.$value['id'].'&date_start='.date('Y-m-d', strtotime('-1 month')).'&date_end='.date('Y-m-d',strtotime('-1 day'))?>"><?=$value['register']?></a></td>
                                       <td><a href="<?=base_url().'Admin/MemberCount/mcountList?hotel='.$value['id'].'&date_start='.date('Y-m-d', strtotime('-1 month')).'&date_end='.date('Y-m-d',strtotime('-1 day'))?>"><?=$value['auth']?></a></td>
                                    </tr>
                                <?php }}?>
                                </tbody>
                            </table>
                </form>
                <?php $this->load->view('Admin/Page/page'); ?>
            </div>
        </div>
        
    

	<script src="/static/lib/jquery-1.12.4.min.js"></script>
	<script type="text/javascript" src="/static/lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="/static/lib/jquery.form.min.js"></script>
    <script type="text/javascript" src="/static/js/common/util.js"></script>
	<script type="text/javascript" src="/static/js/common/upload.js"></script>
	<script type="text/javascript" src="/static/lib/jquery.validate.js"></script>
	<script type="text/javascript" src="/static/lib/messages_zh.js"></script>
	<script type="text/javascript" src="/static/js/common/validateExtend.js"></script>
	<script type="text/javascript" src="/static/js/common/common.js"></script>
    <!-- <script type="text/javascript" src="/static/lib/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="/static/lib/ueditor/ueditor.all.min.js"></script>
	<script type="text/javascript" src="/static/lib/ueditor/addCustomizeDialog.js"></script> -->
    <script>
        var imgModal = $('#img-modal');
        function createPreviewModal(url) {
        if(!url||url==''){
            return;
        }
        var str;
		if (imgModal.length > 0) {
			imgModal.find('.modal-body').find('img').attr('src', url);
			imgModal.removeClass('hide');
			return;
		} 

		str = '<div class="modal hide" id="img-modal">'+
				    '<div class="modal-mask"></div>'+
				    '<div class="modal-content">'+
				        '<div class="modal-header">'+
				            '<i class="iconfont" data-dismiss="modal">&#xe63d;</i>'+
				            '<div class="modal-title">图片预览</div>'+
				        '</div>'+
				        '<div class="modal-body">'+
				        	'<img class="preview-img-box" src="'+ url +'">'+
				        '</div>'+ 
				    '</div>'+
				'</div>';
		$('body').append(str);
		setTimeout(function() {
			imgModal = $('#img-modal');
			imgModal.removeClass('hide');
		}, 20);
	}
    </script>
</body>
</html>
